﻿Public Class Uhr
    Dim Moving As Boolean = False
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = TimeOfDay
    End Sub

    Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
        OvalShape1.Left = MousePosition.X - 71
        OvalShape1.Top = MousePosition.Y - 71
        Label1.Left = MousePosition.X - 61
        Label1.Top = MousePosition.Y - 16
    End Sub

    Private Sub OvalShape1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OvalShape1.Click
        Moving = True
        Timer2.Start()
    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
        If Moving = False Then
            Moving = True
            Timer2.Start()
        ElseIf Moving = True Then
            Moving = False
            Timer2.Stop()
        End If
    End Sub
End Class